import request from '@/utils/request'

// 查询种植区信息列表
export function listArea(query) {
  return request({
    url: '/region/plantarea/list',
    method: 'get',
    params: query
  })
}

// 查询种植区信息详细
export function getArea(plantAreaId) {
  return request({
    url: '/region/plantarea/' + plantAreaId,
    method: 'get'
  })
}

// 新增种植区信息
export function addArea(data) {
  return request({
    url: '/region/plantarea',
    method: 'post',
    data: data
  })
}

// 修改种植区信息
export function updateArea(data) {
  return request({
    url: '/region/plantarea/update',
    method: 'put',
    data: data
  })
}

// 删除种植区信息
export function delArea(plantAreaId) {
  return request({
    url: '/region/plantarea/' + plantAreaId,
    method: 'delete'
  })
}
